package com.feign.controller;

import com.feign.service.FeignClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: TestFeignClientController
 * @Author: ZhangYue26
 * @Description:
 * @Date: 2021-01-12
 */
@RestController
public class TestFeignClientController {
    @Autowired
    public FeignClientService feignClientService;

    @GetMapping("test-feign-client-1")
    public String testFeignClient1(@RequestParam(value = "name", required = false) String name) {
        return feignClientService.sayHi(name);
    }
}
